-
Notifications
You must be signed in to change notification settings - Fork 212
Fix sidebar rendering bugs #1233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Please drop the clippy commits, those were fixed in #1235. |
This corrects a bug where the CSS selcetor to reposition the top of the rustdoc sidebar was no longer applied to the element. It also updates the magic number to be less magic. Fixes rust-lang#1121
Clippy commits removed, and this PR has been rebased on master. |
I still see some issues with this (I have it open on desktop, taking up half of the screen). Notice how 'Regex' and 'Version' move over to the right when you open the sidebar. I'm ok with fixing that in a follow-up, but do you think it would be easy to fix here? |
I'm in favor of getting it sorted out in this PR so we don't have to revisit it. I'll try to replicate and address. 👍 |
This addresses some visible jank caused by the sidebar nav container overflow changing the rendered size.
Alright - this was a fun difference in how Firefox (which I was developing and testing in) and Chrome handled scrollbars and overflow. I've pushed an update that still results in a jump, but I confirmed locally that the jump is also present with rustdocs. Here's a comparison screencap. Given consistency is our goal, this feels like the most-correct course of action. |
I agree it's better to fix this in rustdoc than special case docs.rs. If you're interested in working on that let me know :) Thanks for working on this! |
@jyn514 I'd love to tackle the root cause in rustdoc! 🛠️ |
@arusahni awesome! I'd take a look around https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/rustdoc.css. There's instructions for building rustdoc at https://rustc-dev-guide.rust-lang.org/rustdoc.html. Feel free to ask for help on Zulip if you need it :) |
This corrects two bugs with the sidebar's presentation:
The fixes are grouped by commit so they can be separately reviewed.
Thanks, and Happy New Year! 🎆 🤞